package factory.simpleFactory;
import factory.carType.*;

public class FactorySimple {
    public static car getCar(String name){
        return switch (name) {
            case "小米" -> new xiaomi();
            case "特斯拉" -> new Tesla();
            case "五菱宏光" -> new wuling();
            default -> null;
        };
    }
}
